let Main = () => import('@/views/Main');

// 运营管理
const OPERATION = [
    {
        path: "yunying",
        name: "yunying",
        component: Main,
        meta: {
            title: "运营管理",
            icon: "icon-yunying"
        },
        children: [
            {
                path: "order",
                name: "ordermessage",
                component: () => import('@/views/operationsAdministration/Order.vue'),//订单管理
                meta: {
                    title: "订单管理",
                    name: "ordermessage"
                }
            },
            {
                path: "comment",
                name: "commentmessage",
                component: () => import('@/views/operationsAdministration/Comment.vue'),//评论管理
                meta: {
                    title: "评论管理",
                    name: "commentmessage"
                }
            },
            {
                path: "freight",
                name: "frdermessage",
                component: () => import('@/views/operationsAdministration/Freight.vue'),//运费管理
                meta: {
                    title: "运费管理",
                    name: "frdermessage"
                }
            }
        ]
    }
]
// 商品管理
const COMMODITY = [
    {
        path: "shangpin",
        name: "shangpin",
        component: Main,
        meta: {
            title: "商品管理",
            icon: "icon-gouwuche"
        },
        children: [
            {
                path: "product",
                name: "productmessage",
                component: () => import('@/views/commodityAdministration/Product.vue'),//商品列表
                meta: {
                    title: "商品列表",
                    name: "productmessage"
                },
            },
            {
                path: "addProduct",
                name: "addProductMessage",
                component: () => import('@/views/commodityAdministration/addProduct.vue'),//添加商品
                meta: {
                    title: "创建商品",
                    parent:"/Index/productmessage/product",//上一级路由
                    hidden:true,//不显示在左边功能菜单
                    keepAlive:true
                },
            },
            {
                path: "compileProduct",
                name: "compileProductMessage",
                component: () => import('@/views/commodityAdministration/compileProduct.vue'),//编辑商品
                meta: {
                    title: "编辑商品",
                    parent:"/Index/productmessage/product",//上一级路由
                    hidden:true,//不显示在左边功能菜单
                },
            },
            {
                path: "groupbuying",
                name: "groupbuyingmessage",
                component: () => import('@/views/commodityAdministration/Groupbuying.vue'),//团购项目
                meta: {
                    title: "团购项目",
                    name: "groupbuyingmessage"
                }
            },
            {
                path: "category",
                name: "categorymessage",
                component: () => import('@/views/commodityAdministration/Category.vue'),//类目管理
                meta: {
                    title: "类目管理",
                    name: "categorymessage"
                }
            },
        ]
    }
]
// 推广管理
const PROMOTION = [
    {
        path: "tuiguang",
        name: "tuiguang",
        component: Main,
        meta: {
            title: "推广管理",
            icon: "icon-tushu"
        },
        children: [
            {
                path: "advertising",
                name: "advertisingmessage",
                component: () => import('@/views/popularizeAdministration/Advertising.vue'),//广告管理
                meta: {
                    title: "广告管理",
                    name: "advertisingmessage"
                }
            },
            {
                path: "discount",
                name: "discountmessage",
                component: () => import('@/views/popularizeAdministration/Discount.vue'),//优惠卷管理
                meta: {
                    title: "优惠卷管理",
                    name: "discountmessage"
                }
            }
        ]
    }

]
// 用户管理
const USER = [
    {
        path: "yonghu",
        name: "yonghu",
        component: Main,
        meta: {
            title: "用户管理",
            icon: "icon-user"
        },
        children: [
            {
                path: "member",
                name: "membermessage",
                component: () => import('@/views/userAdministration/Member.vue'),//会员管理
                meta: {
                    title: "会员管理",
                    name: "membermessage"
                }
            },
            {
                path: "address",
                name: "addressmessage",
                component: () => import('@/views/userAdministration/Address.vue'),//地址管理
                meta: {
                    title: "地址管理",
                    name: "addressmessage"
                }
            }
        ]
    }
]

// 系统管理
const SYSTEM = [
    {
        path: "xitong",
        name: "xitong",
        component: Main,
        meta: {
            title: "系统管理",
            icon: "icon-shezhi"
        },
        children: [
            {
                path: "deploy",
                name: "deploymessage",
                component: () => import('@/views/systemAdministration/Deploy.vue'),//系统配置
                meta: {
                    title: "系统配置",
                    name: "deploymessage"
                }
            },
            {
                path: "administrator",
                name: "administratormessage",
                component: () => import('@/views/systemAdministration/Administrator.vue'),//管理员
                meta: {
                    title: "管理员",
                    name: "administratormessage"
                }
            }, {
                path: "operate",
                name: "operatemessage",
                component: () => import('@/views/systemAdministration/Operate.vue'),//操作日志
                meta: {
                    title: "操作日志",
                    name: "operatemessage"
                }
            },
            {
                path: "role",
                name: "rolemessage",
                component: () => import('@/views/systemAdministration/Role.vue'),//角色管理
                meta: {
                    title: "角色管理",
                    name: "rolemessage"
                }
            }
        ]
    }
]

export default [
    ...OPERATION,// 运营管理
    ...COMMODITY,// 商品管理
    ...PROMOTION,// 推广管理
    ...USER,// 用户管理
    ...SYSTEM,// 系统管理
]